clear all

*set working directory
use "study2_data.dta"


***********************
* manipulation checks *
***********************

xtset CaseId

*moral stance
xtreg check i.moral i.ext i.issue, re cluster(CaseId)

*extreme stance
xtreg extreme i.moral i.ext i.issue, re cluster(CaseId)

*testing for treatment interactions
xtreg check i.moral##i.ext i.issue, re cluster(CaseId)
xtreg extreme i.moral##i.ext i.issue, re cluster(CaseId)


************
* analysis *
************

*main analysis of sincerity dv
xtreg cred moral ext i.issue, re cluster(CaseId)

*examining interaction between treatments
xtreg cred i.stance i.issue, re cluster(CaseId)
test 2.stance=4.stance

*comparing with trust and pid strength
xtreg cred i.stance PIDext govtrust i.issue, re cluster(CaseId)
est store m1

*figure 2
coefplot m1, keep(2.stance 3.stance 4.stance PIDext govtrust) xline(0) xlab(-.03(.03).06) coeflabels(2.stance="Moral Moderate" 3.stance="Pragmatic Extreme" 4.stance="Moral Extreme" PIDext="Partisan Strength" govtrust="Government Trust")

*controlling for trust, efficacy
xtreg cred moral ext govtrust i.issue, re cluster(CaseId)
xtreg cred moral ext socialtrust i.issue, re cluster(CaseId)
xtreg cred moral ext exteff i.issue, re cluster(CaseId)

*moderation by trust, efficacy
xtreg cred i.moral##c.govtrust i.ext##c.govtrust i.issue, re cluster(CaseId)
xtreg cred i.moral##c.socialtrust i.ext##c.socialtrust i.issue, re cluster(CaseId)
xtreg cred i.moral##c.exteff i.ext##c.exteff i.issue, re cluster(CaseId)
